<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // es6 数组的解构赋值
        // let arr  =["胡老六","曾小三","赵老四"]
        // let  [a,b,c]=arr;
        // console.log(a,b,c);

        // let [a,b,c] =["胡老六","曾小三","赵老四"]
        // console.log(a,b,c);


        // es6  对象的解构
        let obj = {
            name : "张三",
            age:20,
            height:"178cm"
        }
        // 自定义变量接受对象属性
        let {name:myname,age:myage,height:myheight} = obj;
        console.log(myname,myage,myheight);

        let {name,age,height} =obj;
        console.log(name,age,height);
    </script>
</body> 
</html>